<div class="app-modal valign-wrapper">
    <div class="container height100">
        <div class="row height100">
            <div class="col-md-9 col-md-offset-2 height100 valign-wrapper">
                <div class="modal-content">
                    <div class="modal-header clearfix">
                        <img class="account" src="/images/account.png">

                        <h2 class="media-heading">{{'Account'|translate}}</h2>

                        <input id="accountAddress" class="clipboard" value="{{account.address}}" readonly>

                        <input id="accountPublicKey" class="clipboard publicKey" value="{{account.publicKey}}" readonly>

                        <div class="close-modal" ng-click="close()">
                            <span class="sr-only"><translate>Close modal</translate></span>
                        </div>
                    </div>
                    <div class="modal-nav" ng-if="account.address != address">
                        <ul class="nav nav-justified nav-actions" ng-if="account.address">
                            <li>
                                <button class="btn-flat btn-copy blue-link" clipboard data-clipboard-target="#accountAddress" clipboard-success="clipboardSuccess(e);" clipboard-error="clipboardCommand(e);"><i class="small material-icons">assignment</i><translate>Copy Address</translate></button>
                            </li>
                            <li>
                                <button class="btn-flat btn-copy blue-link" clipboard data-clipboard-target="#accountPublicKey" clipboard-success="clipboardSuccess(e);" clipboard-error="clipboardCommand(e);"><i class="small material-icons">assignment</i><translate>Copy Public Key</translate></button>
                            </li>
                            <li>
                                <button class="btn-flat btn-copy blue-link" ng-click="sendTransactionToUser()"><i class="mdi-content-send"></i><translate>Send LSK</translate></button>
                            </li>
                        </ul>
                    </div>
                    <div class="scrolling">
                        <div class="modal-body">
                            <ul class="list-group">
                                <li class="list-group-item summary"><translate>Summary</translate></li>
                                <li class="list-group-item bordered"><translate>Total Balance</translate>
                                    <span class="pull-right small-text">{{account.unconfirmedBalance | liskFilter }} LSK</span>
                                </li>
                                <li class="list-group-item"><translate>USD Equivalent</translate>
                                    <span class="pull-right small-text">${{convertToUSD(account.unconfirmedBalance) || 0 | number: 2}}</span>
                                </li>
                            </ul>
                        </div>
                        <div class="modal-chapter clearfix">
                            <div class="multiline" ng-click="toggleTransactions()">
                                <h2>{{'Transactions'|translate}}</h2>
                                <div class="chapter-more pull-right" ng-class="{'open': transactions.view, 'closed': !transactions.view}">{{transactions.list.length || '0'}} <translate>Transactions</translate></div>
                            </div>
                        </div>
                        <div ng-repeat="transaction in transactions.list" ng-show="transactions.view">
                            <div class="modal-header">
                                <h2>{{'Transaction ID'|translate}}:</h2>

                                <input id="transactionId" class="clipboard" value="{{transaction.id}}" readonly>
                                <button class="btn-flat btn-copy blue-link" clipboard data-clipboard-target="#transactionId" clipboard-success="clipboardSuccess(e);" clipboard-error="clipboardCommand(e);"><i class="small material-icons">assignment</i><translate>Copy Transaction ID</translate></button>
                            </div>
                            <div class="modal-body">
                                <ul class="list-group">
                                    <li class="list-group-item bordered"><translate>Confirmations</translate>
                                        <span class="pull-right small-text">{{transaction.confirmations}}</span>
                                    </li>
                                    <li class="list-group-item"><translate>Amount</translate>
                                        <span class="pull-right small-text">{{transaction.amount / 100000000}} LSK</span>
                                    </li>
                                    <li class="list-group-item bordered"><translate>Fee</translate>
                                        <span class="pull-right small-text">{{transaction.fee / 100000000}} LSK</span>
                                    </li>
                                    <li class="list-group-item"><translate>USD Equivalent</translate>
                                        <span class="pull-right small-text">${{convertToUSD(transaction.amount) || 0 | number: 2}}</span>
                                    </li>
                                    <li class="list-group-item bordered"><translate>Time</translate>
                                        <span class="pull-right small-text">{{transaction.timestamp | timestampFilter}}</span>
                                    </li>
                                </ul>
                                <ul class="list-group transactions">
                                    <!-- ngRepeat: transaction in transactions -->
                                    <li class="list-group-item">
                                        <div class="transaction-data"><strong><translate>Transaction ID</translate>:</strong> {{transaction.id}}
                                            <span class="pull-right">{{transaction.timestamp | timestampFilter}}</span>
                                        </div>
                                        <div class="transaction-path">
                                            <div class="transaction-part pull-left">
                                                <a href="#" class="blue-link" ng-click="getAccountDetail(transaction.senderId)">{{transaction.senderId}}</a>
                                                <span class="lisk">{{transaction.amount | liskFilter}} LSK</span>
                                            </div>
                                            <div class="transaction-direction"></div>
                                            <div class="transaction-part pull-right">
                                                <a href="#" class="blue-link" ng-click="getAccountDetail(transaction.recipientId)">{{transaction.recipientId
                                                || ""}}</a>
                                                <span class="lisk">{{transaction.amount | liskFilter}} LSK</span>
                                            </div>
                                        </div>
                                        <div class="transaction-bottom">
                                            <div class="fee"><translate>FEE</translate>: {{transaction.fee | liskFilter}} LSK</div>
                                            <div class="lisk">{{transaction.amount | liskFilter}} LSK</div>
                                            <div class="confirmations">{{transaction.confirmations || 0 }} <translate>CONFIRMATIONS</translate></div>
                                        </div>
                                    </li>
                                    <!-- end ngRepeat: transaction in transactions -->
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
